<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>社区养老服务信息系统</title>
	</head>
	<link rel="stylesheet" type="text/css" href="../js/layui/css/layui.css"/>
	<script src="../js/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/JQuery.js" type="text/javascript" charset="utf-8"></script>
	<style type="text/css">
		body{background-color: white;font-family: "Microsoft Yahei";font-size: 16px;margin: auto;}
		.title{display: inline-block; font-size: 30px;font-weight: bold;margin-top: 10px;margin-left: 150px;}
		.list{margin: auto;background-color: antiquewhite;padding-left: 500px;}
		.type{display: inline-block;padding-left: 100px;}
		.test{width: 2000px;height: 2000px;background-color: #0000FF;display: block;position: absolute;}
		.four{display:none}
		.five{display:none}
		.three{display:none}
		.one{display:none;width: 400px;height: 400px;border-color: #000000;border-radius: 10px;position: relative;left:600px;background-color: white;opacity: 0.9;}
		.two{display:none;width: 400px;height: 400px;border-color: #000000;border-radius: 10px;position: relative;left:600px;background-color: white;opacity: 0.9;}
		.six{display:none;width: 400px;height: 400px;border-color: #000000;border-radius: 10px;position: relative;left:600px;background-color: white;opacity: 0.9;}
		.head{display: block;text-align: center;font-size: 28px;font-weight: bold;padding-top: 30px;}
		.unite{margin-top: 10px;font-size: 20px;margin-left: 50px;}
		.unite div:nth-child(1){display: inline-block;width: 90px;margin-left: 10px;}
		.unite div:nth-child(2){display: inline-block;width: 100px;}
		.unite div:nth-child(3){display: inline-block;width: 90px;}
		.layui-btn-normal{margin: auto;display: block;width: 200px;margin-top: 20px;}
		.mengceng{display:none;background-color:gray;left:0;opacity: 0.5;position: absolute;top: 0;z-index: 1;width: 100%;height: 100%;}
		.mengcengshang{display:none;background-color:white;margin: auto; position: absolute;margin-top: 200px; left: 700px; z-index: 1;width: 350px;height: 120px;}
		.mengcengshang1{display:none;background-color:white;margin: auto; position: absolute;margin-top: 200px; left: 700px; z-index: 1;width: 350px;height: 210px;}
	</style>
	<body>
		<div class="mengceng"></div>
		<div class="mengcengshang">
			<div class=" unite">
						<span class="">疾病参数:</span>
						<input type="text" name="" id="updatemessage" placeholder=""/>
			</div>
			<button class="layui-btn layui-btn-normal" id="updatemessagebtn">修改</button>
		</div>
		<div class="mengcengshang1">
			<div class=" unite">
						<span class="">疾病名称:</span>
						<input type="text" name="" id="insertmessage1" placeholder=""/>
			</div>
			<div class=" unite">
						<span class="">疾病参数:</span>
						<input type="text" name="" id="insertmessage2" placeholder=""/>
			</div>
			<button class="layui-btn layui-btn-normal" id="insertmessagebtn">修改</button>
		</div>
		<div class="heads">
			<span class="title">社区养老服务信息系统</span>
			<span class="type">登录类型：</span>
			<span>服务者</span>
			<span class="type">账号：</span>
			<span>${account_id }</span>
		</div>
		<div>
			<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
			  <ul class="layui-tab-title list">
			    <li id="mara3">服务记录管理</li><!-- 服务查看 老人信息查看  老人健康更新   -->
			    <li id="mara4">评价查看</li>
			    <li id="mara5">资金记录</li>
			    <li id="mara">服务信息管理</li><!-- 服务信息的管理 -->
			    <li id="mara2">个人信息管理</li>
				<li id="mara6">密码修改</li>
			  </ul>
			  <div class="layui-tab-content"></div>
			</div> 
		</div>
		
		
		<div class="one" style="position: absolute;top: 200px">
			<div class="login_body">
					<div class=" unite">
						<span class="">服务编号:</span>
						<input type="text" name="" id="one1" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原服务名:</span>
						<input type="text" name="" id="one2" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新服务名:</span>
						<input type="text" name="" id="one22" value=""  placeholder="服务名" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来内容:</span>
						<input type="text" name="" id="one3" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的内容:</span>
						<input type="text" name="" id="one33" value="" placeholder="服务内容" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来价格:</span>
						<input type="text" name="" id="one4" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的价格:</span>
						<input type="text" name="" id="one44" value="" placeholder="服务价格" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来类型:</span>
						<input type="text" name="" id="one5" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的类型:</span>
						<input type="text" name="" id="one55" value="" placeholder="服务类型" maxlength="20"/>
					</div>
					<button class="layui-btn layui-btn-normal" id="one66">修改</button>
				</div>
		</div>
		
		<div class="two" style="position: absolute;top: 200px">
		<div class="login_body">
					<div class=" unite">
						<span class="">个人编号:</span>
						<input type="text" name="" id="two1" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来姓名:</span>
						<input type="text" name="" id="two2" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的姓名:</span>
						<input type="text" name="" id="two22" value=""  placeholder="姓名" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">原来性别:</span>
						<input type="text" name="" id="two3" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的性别:</span>
						<input type="text" name="" id="two33" value="" placeholder="性别" maxlength="1"/>
					</div>
					<div class=" unite">
						<span class="">原来电话:</span>
						<input type="text" name="" id="two4" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新的电话:</span>
						<input type="text" name="" id="two44" value="" placeholder="电话" maxlength="11"/>
					</div>
					<div class=" unite">
						<span class="">原身份证:</span>
						<input type="text" name="" id="two5" value="" readonly="readonly" style="color: red"  style="color: red" placeholder="" maxlength="20"/>
					</div>
					<div class=" unite">
						<span class="">新身份证:</span>
						<input type="text" name="" id="two55" value="" placeholder="身份证号" maxlength="18"/>
					</div>
					<div class=" unite">
						<span class="">服务编号:</span>
						<input type="text" name="" id="two6" value="" readonly="readonly" style="color: red"  placeholder="" maxlength="20"/>
					</div>
					<button class="layui-btn layui-btn-normal" id="two77">修改</button>
				</div>
		</div>
		<div class="three">
			<table class="layui-table table" id="test">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>订单号/疾病号</th>
			      <th>创建日期/疾病名称</th>
			      <th>预定日期/疾病参数</th>
			      <th>老人id</th>
				  <th>完成日期</th>
				  <th>订单状态</th>
				  <th>订单价格</th>
				  <th>服务者id</th>
				  <th>下单账号</th>
				  <th>老人名字</th>
				  <th>老人性别</th>
				  <th>身份证号</th>
				  <th>地址</th>
				  <th>电话</th>
				  <th>描述</th>
				  <th>家人电话</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye1">
			  </tbody>
			</table>
			<div class="first1"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prev1"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="next1"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="last1 "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpage1"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jump1" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jumps1"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppage1" style="display: inline-block;"></div>
		</div>
		<div class="four">
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>评价id</th>
			      <th>评价等级</th>
			      <th>评价内容</th>
				  <th>评价人账号</th>
				   <th>订单号</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye">
			  </tbody>
			</table>
			<div class="first"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prev"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="next"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="last "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpage"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jump" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jumps"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppage" style="display: inline-block;"></div>
		</div>
		<div class="five">
			<table class="layui-table table">
			  <colgroup>
			    <col width="150">
			    <col width="200">
			    <col>
			  </colgroup>
			  <thead>
			    <tr>
			      <th>资金编号</th>
			      <th>操作类型</th>
			      <th>操作金额</th>
				  <th>操作日期</th>
			    </tr> 
			  </thead>
			  <tbody id="fenye2">
			  </tbody>
			</table>
			<div class="first2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">首页</div>
			<div class="prev2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">上一页</div>
			<div class="next2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">下一页</div>
			<div class="last2 "
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">尾页</div>
			<div class="indexpage2"
				style="display: inline-block; width: 150px; height: 100px; position: relative; left: 400px; top: 20px"></div>
			<button type="button" class="jump2" style="display: inline-block; width: 60px; height: 30px; position: relative; left: 400px; top: 20px">跳转至</button>
			<div class="jumps2"
				style="display: inline-block; width: 50px; height: 100px; position: relative; left: 400px; top: 20px">
				<input type="text" class="jumppage2" style="display: inline-block;"></div>
		</div>
		<div class="six" style="position: absolute;top: 250px">
			<div class="login_body">
					<div class="login_yonghumings unite">
						<span class="login_yonghuming">原&nbsp;&nbsp;密&nbsp;&nbsp;码：</span>
						<input type="password" name="" id="password11" value="" placeholder="原密码" maxlength="20"/>
					</div>
					<div class="login_mimas unite">
						<span class="login_mima">新&nbsp;&nbsp;密&nbsp;&nbsp;码：</span>
						<input type="password" name="" id="password22" value="" placeholder="新密码" maxlength="20"/>
					</div>
					<div class="login_mimas unite">
						<span class="login_mima">确认&nbsp;密码：</span>
						<input type="password" name="" id="password33" value="" placeholder="确认密码" maxlength="20"/>
					</div>
					<button class="layui-btn layui-btn-normal" id="six11">修改</button>
				</div>
		</div>
		<div class="bottom" style="display: block;width: 100%;height: 70px;background-color: antiquewhite;position: absolute;bottom: 0;font-size: 12px">
			<span style="display: block;position: absolute;top: 15px;left: 38%;">如遇问题欢迎致电  热线电话：15979292103 阳雨晨 版权所有</span>
				<span style="display: block;position: absolute;top: 40px;left: 40%;">Copyright © 2020 Create By YangYuChen </span>
		</div>
	</body>
	<script type="text/javascript">
		$(function(){
			$("#mara").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"block"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				var account_id=${account_id};
				$.post("${pageContext.request.contextPath}/consumer/getService",{account_id:account_id},function(data){
					data = eval(data); 
					var temp=data.length;
					 try
					   {
						 var s=data[0].service_id;
					   }
					 catch(err)
					   {
						 temp=0;
					   }
					if(temp==0||temp=="0"){
						alert("请添加服务");
					}else{
						$("#one1").val(data[0].service_id);
						$("#one2").val(data[0].service_name);
						$("#one3").val(data[0].service_content);
						$("#one4").val(data[0].service_price);
						$("#one5").val(data[0].service_type); 
					}
				});
				$("#one66").click(function(){
					var service_id;
					var service_name;
					var service_content;
					var service_price;
					var service_type;
					if($("#one1").val()==null||$("#one1").val()=="null"||$("#one1").val()==""){
						if($("#one22").val()!=null&&$("#one33").val()!=null&&$("#one44").val()!=null&&$("#one55").val()!=null){
								service_name=$("#one22").val();
								service_content=$("#one33").val();
								service_price=$("#one44").val();
								service_type=$("#one55").val();
								$.post("${pageContext.request.contextPath}/consumer/insertService",{account_id:account_id,service_name:service_name,service_content:service_content,service_price:service_price,service_type:service_type},function(data){
									data = eval(data); 
									if(data==true||data=="true"){
										alert("添加成功");
									}
								});
						}else{
							alert("请输入全部数据");
						}
					}else{
						if($("#one11").val()!=null){
							service_id=$("#one11").val();
						}else{
							service_id=$("#one1").val();
						}
						if($("#one22").val()!=null){
							service_name=$("#one22").val();
						}else{
							service_name=$("#one2").val();
						}
						if($("#one33").val()!=null){
							service_content=$("#one33").val();
						}else{
							service_content=$("#one3").val();
						}
						if($("#one44").val()!=null){
							service_price=$("#one44").val();
						}else{
							service_price=$("#one4").val();
						}
						if($("#one55").val()!=null){
							service_type=$("#one55").val();
						}else{
							service_type=$("#one5").val();
						}
						$.post("${pageContext.request.contextPath}/consumer/updateService",{service_id:service_id,service_name:service_name,service_content:service_content,service_price:service_price,service_type:service_type},function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$.post("${pageContext.request.contextPath}/consumer/getService",{account_id:account_id},function(data){
									data = eval(data); 
										$("#one1").val(data[0].service_id);
										$("#one2").val(data[0].service_name);
										$("#one3").val(data[0].service_content);
										$("#one4").val(data[0].service_price);
										$("#one5").val(data[0].service_type); 
										$("#one22").val("");
										$("#one33").val("");
										$("#one44").val("");
										$("#one55").val("");
								});
							}
						});
					}
				})
			})
			$("#mara2").click(function(){
				$(".two").css({display:"block"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				var account_id=${account_id};
				$.post("${pageContext.request.contextPath}/consumer/getServicer",{account_id:account_id},function(data){
					data = eval(data); 
					var temp=data.length;
					 try
					   {
						 var s=data.servicer_id;
					   }
					 catch(err)
					   {
						 temp=0;
					   }
					if(temp==0||temp=="0"){
						window.location="${pageContext.request.contextPath }/jsp/login.jsp";
					}else{
						$("#two1").val(data.servicer_id);
						$("#two2").val(data.servicer_name);
						$("#two3").val(data.servicer_sex);
						$("#two4").val(data.servicer_tel);
						$("#two5").val(data.servicer_idcard); 
						$("#two6").val(data.service_id); 
					}
				});
				$("#two77").click(function(){
					var servicer_id=$("#two1").val();
					var servicer_name=$("#two22").val();
					var servicer_sex=$("#two33").val();
					var servicer_tel=$("#two44").val();
					var servicer_idcard=$("#two55").val();
					$.post("${pageContext.request.contextPath}/consumer/updateServicers",{servicer_id:servicer_id,servicer_name:servicer_name,
						servicer_sex:servicer_sex,servicer_tel:servicer_tel,servicer_idcard:servicer_idcard},function(data){
						data = eval(data); 
						if(data==true||data=="true"){
							$.post("${pageContext.request.contextPath}/consumer/getServicer",{account_id:account_id},function(data){
								data = eval(data); 
									$("#two1").val(data.servicer_id);
									$("#two2").val(data.servicer_name);
									$("#two3").val(data.servicer_sex);
									$("#two4").val(data.servicer_tel);
									$("#two5").val(data.servicer_idcard); 
									$("#two6").val(data.service_id); 
									$("#two22").val("");
									$("#two33").val("");
									$("#two44").val("");
									$("#two55").val("");
							});
						}else{
							alert("修改失败");    
						}						
						
					});
				})
			})
			$("#mara3").click(function(){
				var pagesum=1;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				$(".two").css({display:"none"});
				$(".three").css({display:"block"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				var account_id=${account_id}
				$("#fenye1").html("");
				$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeopleSum",{account_id:account_id},function(data){
					data = eval(data); 
					pagesum=data;
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
					var data = eval(data); 
					temp=data.length;
					for(var i = 0;i<temp;i++){
						//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
						$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
						$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
							datas = eval(datas); 
							var temps=datas.length;
							for(var j = 0;j<temps;j++){
								$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
							}
						});
					}
					//$("#fenye1").html(content);
					$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".next1").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$("#fenye1").html("");
				$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
					$("#fenye1").html("");
					var data = eval(data); 
					temp=data.length;
					for(var i = 0;i<temp;i++){
						//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
						$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
						$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
							datas = eval(datas); 
							var temps=datas.length;
							for(var j = 0;j<temps;j++){
								$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
							}
						});
					}
					//$("#fenye1").html(content);
					$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prev1").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$("#fenye1").html("");
				$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
					$("#fenye1").html("");
					var data = eval(data); 
					temp=data.length;
					$("#fenye1").html("");
					for(var i = 0;i<temp;i++){
						//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
						$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
						$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
							datas = eval(datas); 
							var temps=datas.length;
							for(var j = 0;j<temps;j++){
								$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
							}
						});
					}
					//$("#fenye1").html(content);
					$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".first1").click(function(){
				page=0; 
				$("#fenye1").html("");
				$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
					$("#fenye1").html("");
					var data = eval(data); 
					temp=data.length;
					for(var i = 0;i<temp;i++){
						//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
						$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
						$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
							datas = eval(datas); 
							var temps=datas.length;
							for(var j = 0;j<temps;j++){
								$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
							}
						});
					}
					//$("#fenye1").html(content);
					$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".last1").click(function(){
					page=pagesum-1;
					$("#fenye1").html("");
					$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
						$("#fenye1").html("");
						var data = eval(data); 
						temp=data.length;
						for(var i = 0;i<temp;i++){
							//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
							$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
						$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
							datas = eval(datas); 
							var temps=datas.length;
							for(var j = 0;j<temps;j++){
								$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
							}
							});
						}
						//$("#fenye1").html(content);
						$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
					});});
				$(".jump1").click(function(){
					if($(".jumppage1").val()>pagesum){
						alert("超过最大页数");
					}else{
						page=$(".jumppage1").val()-1;
					}
					$("#fenye1").html("");
					$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
						$("#fenye1").html("");
						var data = eval(data); 
						temp=data.length;
						for(var i = 0;i<temp;i++){
							//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
							$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
						$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
							datas = eval(datas); 
							var temps=datas.length;
							for(var j = 0;j<temps;j++){
								$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
							}
							});
						}
						//$("#fenye1").html(content);
						$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
					});});
				$("#fenye1").delegate(".updates","click",function(){
					$(".mengceng").css({display:"block"});
					$(".mengcengshang").css({display:"block"});
					var string =$(this).val();
					$("#updatemessagebtn").click(function(){
						var disease_parameter = $("#updatemessage").val();
						$.post("${pageContext.request.contextPath}/consumer/updateDisease",{disease_id:string,disease_parameter:disease_parameter},function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$(".mengceng").css({display:"none"});
								$(".mengcengshang").css({display:"none"});
								$("#fenye1").html("");
								$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
									$("#fenye1").html("");
									var data = eval(data); 
									temp=data.length;
									for(var i = 0;i<temp;i++){
										//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
										$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
									$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
										datas = eval(datas); 
										var temps=datas.length;
										for(var j = 0;j<temps;j++){
											$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
										}
										});
									}
									//$("#fenye1").html(content);
									$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
								});
							}else{
								alert("修改失败");
								$(".mengceng").css({display:"none"});
								$(".mengcengshang").css({display:"none"});
							}
							});
					})
					
				});
				$("#fenye1").delegate(".inserts","click",function(){
					$(".mengceng").css({display:"block"});
					$(".mengcengshang1").css({display:"block"});
					var oldpeople_id =$(this).val();
					$("#insertmessagebtn").click(function(){
						var disease_name = $("#insertmessage1").val();
						var disease_parameter = $("#insertmessage2").val();
						$.post("${pageContext.request.contextPath}/consumer/insertDisease",{disease_name:disease_name,disease_parameter:disease_parameter,oldpeople_id:oldpeople_id},function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$(".mengceng").css({display:"none"});
								$(".mengcengshang1").css({display:"none"});
								$("#fenye1").html("");
								$.post("${pageContext.request.contextPath}/consumer/getOrderOldPeople",{account_id:account_id,page:(page+1)},function(data){
									$("#fenye1").html("");
									var data = eval(data); 
									temp=data.length;
									for(var i = 0;i<temp;i++){
										//content += "<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>";
										$("#test tbody").append("<tr><td>"+data[i].order_id+"</td><td>"+data[i].order_createtime+"</td><td>"+data[i].order_scheduledtime+"</td><td>"+data[i].oldpeople_id+"<button class='inserts' value="+data[i].oldpeople_id+">添加</button></td><td>"+data[i].order_completetime+"</td><td>"+data[i].order_status+"</td><td>"+data[i].order_price+"</td><td>"+data[i].servicer_id+"</td><td>"+data[i].account_id+"</td><td>"+data[i].oldpeople_name+"</td><td>"+data[i].oldpeople_sex+"</td><td>"+data[i].oldpeople_idcard+"</td><td>"+data[i].oldpeople_address+"</td><td>"+data[i].oldpeople_tel+"</td><td>"+data[i].oldpeople_description+"</td><td>"+data[i].oldpeople_familytel+"</td></tr>");
									$.post("${pageContext.request.contextPath}/consumer/getDisease",{oldpeople_id:data[i].oldpeople_id},function(datas){
										datas = eval(datas); 
										var temps=datas.length;
										for(var j = 0;j<temps;j++){
											$("#test tbody").append("<tr><td>"+datas[j].disease_id+"</td><td>"+datas[j].disease_name+"</td><td>"+datas[j].disease_parameter+"</td><td>"+datas[j].oldpeople_id+"<button class='updates' value="+datas[j].disease_id+">修改</button></td></tr>");
										}
										});
									}
									//$("#fenye1").html(content);
									$(".indexpage1").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
								});
							}else{
								alert("添加失败");
								$(".mengceng").css({display:"none"});
								$(".mengcengshang").css({display:"none"});
							}
							});
					})
					
				});
			})
			$('#mara3').trigger("click");
			$("#mara4").click(function(){
				var pagesum=0;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"block"});
				$(".five").css({display:"none"});
				$(".six").css({display:"none"});
				var account_id=${account_id}
				$.post("${pageContext.request.contextPath}/consumer/getAppraisalpage",{account_id:account_id},function(data){
					data = eval(data); 
					pagesum=data;
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$.post("${pageContext.request.contextPath}/consumer/getAppraisal",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".next").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$.post("${pageContext.request.contextPath}/consumer/getAppraisal",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prev").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$.post("${pageContext.request.contextPath}/consumer/getAppraisal",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".first").click(function(){
				page=0; 
				$.post("${pageContext.request.contextPath}/consumer/getAppraisal",{account_id:account_id,page:1},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".last").click(function(){
					page=pagesum-1;
				$.post("${pageContext.request.contextPath}/consumer/getAppraisal",{account_id:account_id,page:pagesum},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".jump").click(function(){
					if($(".jumppage").val()>pagesum){
						alert("超过最大页数");
					}else{
						page=$(".jumppage").val()-1;
					}
				$.post("${pageContext.request.contextPath}/consumer/getAppraisal",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].appraisal_id+"</td><td>"+data[i].appraisal_grade+"</td><td>"+data[i].appraisal_content+"</td><td>"+data[i].account_id+"</td><td>"+data[i].order_id+"</td></tr>";
					}
					$("#fenye").html(content);
					$(".indexpage").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
			})
			$("#mara5").click(function(){
				var pagesum=1;//总页数
				var page=0;//当前页数-1
				var temp=0;//根据数据总数和余数获取for循环的循环次数
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"block"});
				$(".six").css({display:"none"});
				var account_id=${account_id}
				$.post("${pageContext.request.contextPath}/consumer/getFundsPage",{account_id:account_id},function(data){
					data = eval(data); 
					pagesum=data;
				});
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});
				$(".next2").click(function(){
				if(page+1<pagesum){
					page=page+1;
				}else{
					page=page;
				}
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".prev2").click(function(){
				if(page>0){
					page=page-1;
				}else{
					page=page;
				} 
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".first2").click(function(){
				page=0; 
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:1},function(data){
					data = eval(data); 
					var content="";
					temp=data.length;
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".last2").click(function(){
					page=pagesum-1;
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:pagesum},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
				$(".jump2").click(function(){
					if($(".jumppage2").val()>pagesum){
						alert("超过最大页数")
					}else{
						page=$(".jumppage2").val()-1;
					}
				$.post("${pageContext.request.contextPath}/consumer/getFunds",{account_id:account_id,page:(page+1)},function(data){
					data = eval(data); 
					temp=data.length;
					var content="";
					for(var i = 0;i<temp;i++){
						content += "<tr><td>"+data[i].funds_id+"</td><td>"+data[i].funds_type+"</td><td>"+data[i].funds_amount+"</td><td>"+data[i].funds_date+"</td></tr>";
					}
					$("#fenye2").html(content);
					$(".indexpage2").html("当前第"+(page+1)+"页      共"+pagesum+"页"); 
				});});
			})
			$("#mara6").click(function(){
				$(".two").css({display:"none"});
				$(".three").css({display:"none"});
				$(".one").css({display:"none"});
				$(".four").css({display:"none"});
				$(".five").css({display:"none"});
				$(".six").css({display:"block"});
				$("#six11").click(function(){
					var password11=$("#password11").val();
					var account_password=$("#password22").val();
					var password33=$("#password33").val();
					var account_type="2";
					if(account_password==password33){
						var account_id=${account_id};
						var params={
								account_id:account_id,
								account_password:password11,
								account_type:account_type
						};
						$.post("${pageContext.request.contextPath}/consumer/logins",params,function(data){
							data = eval(data); 
							if(data==true||data=="true"){
								$.post("${pageContext.request.contextPath}/consumer/updateAccount",{account_id:account_id,account_password:account_password},function(data){
									data = eval(data); 
									if(data==true||data=="true"){
										window.location="${pageContext.request.contextPath }/jsp/login.jsp";
									}
								});
							}else{
								alert("原密码错误");
							}
						});
					}else{
						alert("确认密码错误");
					}
				})
			});
		})
	</script>
</html>
